#include "Buffer.h"
#include "Hazel/platform/OpenGL/OpenGLBuffer.h"
#include "Renderer.h"
#include "hzpch.h"
namespace Hazel
{
Ref<VertexBuffer> VertexBuffer::Create(float *vertices, uint32_t size)
{
    switch (Renderer::GetAPI())
    {
    case RendererAPI::API::None:
        HZ_CORE_ASSERT(false, "not set platform!");
        return nullptr;
#ifdef HZ_PLATFORM_WINDOWS
    case RendererAPI::API::OpenGL:
        return CreateRef<OpenGLVertexBuffer>(vertices, size);
#endif
    }
    assert(false);
    return nullptr;
}
Ref<VertexBuffer> VertexBuffer::Create(uint32_t size)
{
    switch (Renderer::GetAPI())
    {
    case RendererAPI::API::None:
        HZ_CORE_ASSERT(false, "not set platform!");
        return nullptr;
#ifdef HZ_PLATFORM_WINDOWS
    case RendererAPI::API::OpenGL:
        return CreateRef<OpenGLVertexBuffer>(size);
#endif
    }
    HZ_CORE_ASSERT(false, "not spport the platform!");
    return nullptr;
}
Ref<IndexBuffer> IndexBuffer::Create(uint32_t *Indices, uint32_t count)
{
    switch (Renderer::GetAPI())
    {
    case RendererAPI::API::None:
        HZ_CORE_ASSERT(false, "not set platform!");
        return nullptr;
#ifdef HZ_PLATFORM_WINDOWS
    case RendererAPI::API::OpenGL:
        return CreateRef<OpenGLIndexBuffer>(Indices, count);
#endif
    }
    assert(false);
    return nullptr;
}
} // namespace Hazel